
#ifndef SX_MASS_SPRING_SIMULATION_KEY_FRAME_H
#define SX_MASS_SPRING_SIMULATION_KEY_FRAME_H

#include <sxDiscreteKeyFrame.h>
#include <sxAutoReferenceArrayList.h>
#include <sxMassSpringMeshState.h>

using Sx::Multimedia::Animation::DiscreteKeyFrame;
using Sx::Simulation::Recording::MassSpringMeshState;

namespace Sx {
namespace Simulation {
namespace Animation {

/*
 * A MassSpringSystem (MSS) Frame stores all of the node information for every
 * mass-spring mesh within a mass-spring system. The number of meshStates will
 * be equal to the number of mass-spring meshes in the system.
 *
 * This class is a POD. An implementation of the AbstractRecorder class should
 * be used to define how the information is converted from the mass-spring
 * system to a frame. Below is an illustration:
 *
 * Mass-Spring-System-KeyFrame
 *    For Every Mass-Spring-Mesh:
 *        meshState:
 *            node position
 *            node velocity
 *            node acceleration
 *            node external force
 *            node internal force
 */
class MassSpringSimulationKeyFrame : public DiscreteKeyFrame {
public:
	/* Auto-reference array for performance. */
	Util::AutoReferenceArrayList<MassSpringMeshState> meshStates;
};

}

}

}

#endif
